This patent specification contains material which is subject to copyright protection. The copyright owner has no objection to the reproduction of this patent specification or related materials from associated patent office files for the purposes of review, but otherwise reserves all copyright whatsoever.
The present invention relates generally to conversions between colour spaces and, in particular, to the prevention of a generalised colour space management and conversion tool that enables optimised work between arbitrary colour spaces. The present invention also relates to a method and apparatus for colour space management and conversion. The invention also relates to a computer program product including a computer readable medium having recorded thereon a computer program for colour space management and conversion.
Modern computer systems are progressively required to support more and more colour spaces, with many of those colour spaces being derived from the calibrations of scanners, printers, and monitors, each of which may be described in a variety of forms. For effective and accurate operation, computer systems must be able to convert data between any of these colour spaces efficiently and accurately. The programming task of supporting efficient colour space conversions grows as the square of the number of colour spaces supported unless some generalised scheme is employed.
One shortcut is to implement only conversions to and from some standard colour space. CIE XYZ is an example of one standard colour space that may be used in such a manner, amongst others. However, such requires that two conversions be performed for most colour space conversions. In particular, one conversion from the source colour space into the standard space and another conversion out of the standard colour space into the target colour space. Since colour conversions generally involve individual conversion of every pixel in an image, the efficiency of the conversion is often extremely important.
Further, the technology required to perform such conversions varies over different computer platforms and is also rapidly changing. The required accuracy for such conversions also varies between computer systems.
As understood by the present inventor, prior art colour conversion systems may operate using one of two arrangements. A first arrangement involves having a conversion function between two colour spaces in memory whereby individual conversions are performed by examining discrete values from the memory. This is effectively a look-up table. This arrangement has a number of problems. Importantly, at least one table is required to be known for each colour space conversion to be performed, thus constraining the scope of conversions and giving rise to a need to store a large number of values so as to be generally useful. In addition to occupying large amounts of memory, such increases access times causing the conversion to proceed more slowly. Look-up tables are also constrained by fixed limitations of accuracy.
A second arrangement involves mathematically calculating the conversion function for each colour value to be converted. Whilst avoiding the memory problem of the above arrangement, this can increase the conversion time for complicated functions. Further, such requires processors dedicated or configurable to specific conversions, which again may constrain the number of conversion functions required to be handled.
A further issue associated with colour conversion is the time at which the conversion takes place. The look-up table approach described above in fact implements the conversion function off-line, which results in the formation of the table in memory. A mere look-up of the table can then occur at run-time (i.e., when individual conversions are required). The calculation approach is performed at run-time, but may be slow, particularly where the computing platform is not configured to efficiently handle the required accuracy of colour conversion. In some cases, the two approaches may be married where, upon loading the particular application, the calculation approach is used to create conversion tables used by the application at run-time. Such an approach in some way addresses the problems of permanent storage and conversion speed.
It is an object of the present invention to substantially overcome, or at least ameliorate, one or more deficiencies associated with existing colour space conversion approaches so a to optimise the colour conversion process.
According to a first aspect of the invention, there is provided a method of determining a processing coordinate range for intermediate colour spaces traversed in a colour conversion list from a source colour space to a target colour space, said method comprising the steps of:
(i) forward processing said list to determine, based from a coordinate range of said source colour space, an input bounding box of values for each remaining colour space in said list;
(ii) reverse processing said list to determine, based from a coordinate range of said target output colour space, an output bounding box for each processing colour space in said list; and
(iii) for each colour space in said list, determining an intersection between the corresponding input and output bounding boxes to establish a processing coordinate range for said colour space in said conversion.
According to another aspect of the invention, there is provided an apparatus for implementing any the aforementioned methods.
According to another aspect of the invention there is provided a computer program product including a computer readable medium having recorded thereon a computer program for implementing the method described above.
Other aspects of the invention are disclosed in the following description.